<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{$title}-{$Think.lang.web_name}</title>
    {include file="comm/header"/}
</head>
<body>
{include file="comm/left_menu"/}
{include file="comm/top_menu"/}
<div class="container main">
    <div class="col-sm-12 border-bottom text-right"><a class="btn btn-primary mgr-10" href="/power/admin_edit/id/{$menu._member_id}"><i class="fa fa-plus"></i>&nbsp;{$Think.lang.admin_add}</a></div>
    <div class="col-sm-12">
        <div class="col-sm-12 margin-bottom-10"></div>
        <table class="table table-striped table-bordered table-hover" id="myTable">
            <thead>
            <tr>
                <th>{$Think.lang.id}</th>
                <th>{$Think.lang.name}</th>
                <th>{$Think.lang.member_sex}</th>
                <th>{$Think.lang.member_phone}</th>
                <th>{$Think.lang.member_add_time}</th>
                <th>{$Think.lang.handle}</th>
            </tr>
            </thead>

            <tbody>
            {foreach name="member_list" key="key" id="v" index="i"}
            <tr>
                <td style="width: 160px;">{$v.member_id}</td>
                <td>{$v.member_user}</td>
                <td>
                    {if $v.member_sex == "0"}{$Think.lang.member_sex_0}{/if}
                    {if $v.member_sex == "1"}{$Think.lang.member_sex_1}{/if}
                    {if $v.member_sex == "2"}{$Think.lang.member_sex_2}{/if}
                </td>
                <td>
                    <input type="text" class="input_init" data-field="member_phone" data-id="{$v.member_id}" value="{$v.member_phone}" data-former="{$v.member_phone}">
                </td>
                <td>{:date("Y-m-d H:i:s",$v.member_add_time)}</td>
                <td style="width: 160px;">
                    <a href="/power/admin_edit/id/{$v.member_id}" class="btn btn-primary btn-xs mgr-10"><i class="fa fa-pencil"></i> {$Think.lang.edit}</a>
                    {if !in_array($v.member_id,[cookie("fwf_admin_id"),1])}
                    <a href="javascript:del('/power/admin_del/id/{$v.member_id}')" class="btn btn-danger btn-xs"><i class="fa fa-times"></i> {$Think.lang.del}</a>
                    {/if}
                </td>
            </tr>
            {/foreach}
            </tbody>
        </table>
    </div>
</div>
{include file="comm/footer"/}
<script type="text/javascript">
    $(function () {
        var inputs = $(".input_init");
        inputs.on("blur",function (e) {
            if(this.getAttribute("data-type")==="number"){
                this.setAttribute("type","text");
            }
        });
        inputs.on("focus",function (e) {
            if(this.getAttribute("data-type")==="number"){
                this.setAttribute("type","number");
            }
        });
    });

</script>
</body>
</html>